home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: dd.chalmers.se!news.chalmers.se!sunic!pipex!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!jamie
- From: jamie@cdevil.unx.sas.com (James Cooper)
- Subject: Re: SAS Keywords (__saveds etc)
- Originator: jamie@cdevil.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <CKCG1B.Lzq@unx.sas.com>
- Date: Fri, 28 Jan 1994 14:24:45 GMT
- References: <inf01.759746947@apollo23>
- Nntp-Posting-Host: cdevil.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 72
-
-
- In article <inf01.759746947@apollo23>, inf01@apollo23.uni-trier.de (Hans-Joerg Frieden) writes:
- >I recently had some difficulties porting some source from SAS to Aztec. The
- >problem arises with all those SAS keywords. Can someone post a list or explain
- >what the following keywords are meant to be?
- >a) __saveds
- > I guess this is the same as doing a geta4() (right)?
-
- Correct. We also support using geta4(), but it is easier to tell
- directly from a prototype that this will happen if you use the keyword
- instead.
-
- >b) __asm
- > I have no clue for this one, except that it might have something
- > to do with register allocation.
-
- Yes. This tells the compiler that this function takes parameters in
- specific registers.
-
- >c) __register
- > I think this is to force a parameter into a register for library
- > calls.
-
- *Must* be used with __asm (mentioed above); it specifies the register a
- parameter will arrive in when the function in called.
-
- int __asm foo(register __a3 char *bar);
-
- This says that function "foo" will receive its only parameter in register
- A3, rather than the default for pointers of A0.
-
- >d) everythink I forgot.
-
- __aligned - force a particular item to be LONGWORD aligned
- __chip - force a particular item to load directly to CHIP
- __near - force a data item into the NEAR data section
- __far - force a data item into the FAR data section
- __interrupt - similar to adding int_start()/int_end()
- __regargs - force a function to take parameters in registers,
- rather than on the stack
- __stdargs - force a function to take parameters from the
- stack, rather than in registers
- __inline - tells the optimizer to put the code for this
- function inline wherever it is called, rather
- than generating a function call
-
- >Why aren't those things done via #pragma's, this would make porting
- >much easier (sigh).
-
- We do supply alternatives to a few of the keywords, but it is usually a
- lot easier to just use 'em directly (when you need one, of course!).
-
- >I hope someone can help me out.
-
- (Blatant favoritism alert! :-)
-
- Well, my best recommendation is (of course), to upgrade to SAS/C. :-)
-
- In the latest version of our compiler, we support most "MANXisms"
- directly, such as #pragma amicall, etc. We even have utilities so you
- can use the same command line switches you are used to, but drive our
- compiler instead.
-
- --
- ---------------
- Jim Cooper
- (jamie@unx.sas.com) bix: jcooper
-
- Any opinions expressed herein are mine (Mine, all mine! Ha, ha, ha!),
- and not necessarily those of my employer.
-
- Remember, "Euphemisms are for the differently brained."
-